﻿ 
 <div class="f_btn">
        <div class="f_btnc">
            @if (string.IsNullOrEmpty(Request["ViewDetail"]))
            {
                <button type="button" onclick="Save()" class="fj btn_c3 btn_s">发送</button> 
            }
             @if (Model.Status == (short)FCDB.Entity.FormStatusEnum.Empty || Model.Status == (short)FCDB.Entity.FormStatusEnum.Draft)
              {
                    <button type="button" id="btnSaveAs" onclick="SaveAsDraft()" class="fj btn_c3 btn_s">保存</button> 
              }
            @if (Model.Status != (short)FCDB.Entity.FormStatusEnum.Empty && Model.Status != (short)FCDB.Entity.FormStatusEnum.Draft)
            {
                <button type="button" onclick="ViewForm()" id="btnViewForm" class="fj btn_c3 btn_s">已阅</button> 
                <button type="button" onclick="SendDocumentLogwForm()" id="btnSendDocumentLogwForm" class="fj btn_c3 btn_s">回复 </button> 
            }
            @if (Model.Status != (short)FCDB.Entity.FormStatusEnum.Empty && Model.Status != (short)FCDB.Entity.FormStatusEnum.Draft)
            {
                <button type="button" onclick="Circulate()" class="fj btn_c3 btn_s">传阅</button> 
                <button type="button" onclick="Consulation()" class="fj btn_c3 btn_s">征求意见</button>  
            }
              @if (Model.Status != (short)FCDB.Entity.FormStatusEnum.Empty && Model.Status != (short)FCDB.Entity.FormStatusEnum.Draft && !string.IsNullOrEmpty(Request["ViewDetail"]))
            { 
                <button type="button" onclick="ProcessSendBack()" class="fj btn_c3 btn_s">撤回</button> 
         } 
               @if (Model.Status != (short)FCDB.Entity.FormStatusEnum.Empty && Model.Status != (short)FCDB.Entity.FormStatusEnum.Draft)
            { 
            <button type="button" onclick="ProcessCopy()" class="fj btn_c3 btn_s">复制流程</button> 
              } 
              
            @if (ViewBag.CanPrintAgreement ==true&&User.HasFlag(FB.Security.FCDB.ProcessInstance.ReadyTasks.PrintAgreement))
            { 
                <button type="button" onclick="PrintAgreement('@Model.ID')" class="fj btn_c3 btn_s">打印协议</button>
                 
             } 
           @if (ViewBag.CanPrintAgreement == true && User.HasFlag(FB.Security.FCDB.ProcessInstance.ReadyTasks.DeleteAgreement))
          { 
                <button type="button" onclick="DeleteAgreement('@Model.ID')" class="fj btn_c3 btn_s">删除协议</button>
           } 
             @if (ViewBag.CanPrintAgreement == true && User.HasFlag(FB.Security.FCDB.ProcessInstance.ReadyTasks.PrintFall))
            { 
                <button type="button" onclick="PrintFall('@Model.ID')" class="fj btn_c3 btn_s">打印保函</button>
             }
          @if (ViewBag.CanPrintAgreement == true && User.HasFlag(FB.Security.FCDB.ProcessInstance.ReadyTasks.DeleteFall))
          { 
                <button type="button" onclick="DeleteFall('@Model.ID')" class="fj btn_c3 btn_s">删除保函</button>
             } 
            <button type="button" onclick="Print()" class="fj btn_c3 btn_s">打印</button>
            
            <button type="button" onclick="Close()" class="fj btn_c3 btn_s">关闭</button>
        
        </div>
    </div>